#include "../include/stu.h"

void findbyname_c(){
    system("clear");
    printf("输入要查询的课程名：\n");
	char name[40];
	scanf("%s",name);
	struct course *p = head2;
	while (p != NULL) {
		if (strcmp(p->name,name)==0) {
			printf("课程号:%d\n课程名:%s\n课程性质：%s\n学时：%d\n学分：%d\n已选人数：%d\n可选人数：%d\n",p->id,p->name,p->type,p->time,p->credit,p->selectde,p->limit);
			return ;
		}
		p = p->next;
	}
	printf("课程不存在!\n");
}
